using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using System.Windows.Media;
using System.Windows.Browser;
using System.Windows.Data;

namespace TFSWorkflowControl.TSWA.SL
{
    public class Revision
    {
        public string Reason { get; private set; }
        public string Who { get; private set; }
        public string State { get; private set; }
        public DateTime Date { get; private set; }
        public Dictionary<string, string> FieldDictionnary { get; private set; }

        /// <summary>
        /// Initializes a new instance of the Revision class.
        /// </summary>
        public Revision(string state, string who, string reason, DateTime date)
        {
            Reason = reason;
            Who = who;
            State = state;
            Date = date;
            FieldDictionnary = new Dictionary<string, string>();
        }

        public void SetFieldValue(string field, string value)
        {
            if (String.IsNullOrEmpty(field) || String.IsNullOrEmpty(value))
                return;
            FieldDictionnary[field] = value;
        }
    }

    public class Converter : IValueConverter
    {

        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return value;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return value;
        }

        #endregion
    }
}
